<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2025/2/6
  Time: 15:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--创建cookie,响应到客户端--%>
<%--    <%
        Cookie cookie = new Cookie("name","TOM");
        response.addCookie(cookie);
        %>  --%>
<%--    读取cookie--%>
    <%
    Cookie[] cookies =request.getCookies();
    for (Cookie cookie:cookies){
        out.write(cookie.getName()+":"+cookie.getValue()+"<br/>");
    }
    %>
</body>
</html>
